package com.zmzncs.lmtc.module.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.order.pojo.order_trade_record.OrderTradeRecord;
import com.zmzncs.lmtc.module.order.pojo.order_trade_record.OrderTradeRecordDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 订单-订单交易记录 Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-09-24
 */
@Repository
public interface OrderTradeRecordDao extends BaseMapper<OrderTradeRecord> {

    /**根据订单号查询订单交易记录*/
    List<OrderTradeRecordDTO> getOrderTradeRecordByOrderCode(String orderCode);
    /**根据订单号和流水号查询订单交易记录*/
    OrderTradeRecordDTO getOrderTradeRecordByOrderCodeTradeNo(@Param("orderCode") String orderCode, @Param("tradeNo") String tradeNo);
    /**根据订单号查询订单支付成功的交易记录*/
    List<OrderTradeRecordDTO> getPaidOrderTradeRecordByOrderCode(String orderCode);

    /**根据订单编号删除信息*/
    void deleteByOrderCode(String orderCode);
}
